From e215db6da21fc7c54f49b247afabc06a18d60513 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 17 Jul 2015 18:38:30 -0400 Subject: [PATCH] GtkGrid: Add a few NULL checks Coverity complained about these. --- gtk/gtkgrid.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c index 1b821b22d0..b12af752f5 100644 --- a/gtk/gtkgrid.c +++ b/gtk/gtkgrid.c @@ -1127,8 +1127,11 @@ gtk_grid_request_sum (GtkGridRequest *request, nat -= linedata->spacing; } - *minimum = min; - *natural = nat; + if (minimum) + *minimum = min; + + if (natural) + *natural = nat; } /* Computes minimum and natural fields of lines. -- 2.30.2